# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64 -run-pass=legalizer %s -o - | FileCheck %s
---
name:            test_sext_inreg
body: |
  bb.0.entry:
    liveins: $w0, $w1
    ; CHECK-LABEL: name: test_sext_inreg
    ; CHECK: liveins: $w0, $w1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w1
    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(s32) = G_SEXT_INREG [[COPY]], 7
    ; CHECK-NEXT: $w0 = COPY [[SEXT_INREG]](s32)
    %0:_(s32) = COPY $w1
    %2:_(s32) = G_SEXT_INREG %0(s32), 7
    $w0 = COPY %2(s32)
...
---
name:            test_v4s16
body: |
  bb.0.entry:
    liveins: $d0
    ; CHECK-LABEL: name: test_v4s16
    ; CHECK: liveins: $d0
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $d0
    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<4 x s16>) = G_SEXT_INREG [[COPY]], 8
    ; CHECK-NEXT: $d0 = COPY [[SEXT_INREG]](<4 x s16>)
    %0:_(<4 x s16>) = COPY $d0
    %2:_(<4 x s16>) = G_SEXT_INREG %0(<4 x s16>), 8
    $d0 = COPY %2(<4 x s16>)
...
---
name:            test_v2s64
body: |
  bb.0.entry:
    liveins: $q0
    ; CHECK-LABEL: name: test_v2s64
    ; CHECK: liveins: $q0
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $q0
    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[COPY]], 48
    ; CHECK-NEXT: $q0 = COPY [[SEXT_INREG]](<2 x s64>)
    %0:_(<2 x s64>) = COPY $q0
    %2:_(<2 x s64>) = G_SEXT_INREG %0(<2 x s64>), 48
    $q0 = COPY %2(<2 x s64>)
...
